#include<bits/stdc++.h>
using namespace std;
#define OK 1
#define ERROR 0
typedef int Status;
typedef struct LNode{
	int data;
	LNode *next;	
}LNode, *LinkList; 
Status Init(LinkList &L)
{
	L = new LNode;
	if(!L) return ERROR;
	L->next = NULL;
	return OK;
}
Status Create(LinkList &L, int n)
{
	LNode *t = L;
	for(int i = 0; i < n; i ++)
	{
		LNode *p = new LNode;
		if(!p) return ERROR;
		cin >> p->data;
		p->next = t->next;
		t->next = p;
		t = p;
	}
	return OK;
}
void Del_Same(LinkList &L)
{
	/************Begin*************/
    LNode *p = L->next;
    while(p)
    {
    	LNode *q = p;
    	while(q->next)
    	{
    		if(q->next->data == p->data)
    		{
    			q->next = q->next->next;
			}
			else q = q->next;
		}
		p = p->next;
	}
    /************End*************/
}
void Show(LinkList L)
{
	LNode *p = L->next;
	while(p)
	{
		cout << p->data << ' ';
		p = p->next;
	}
	cout << endl;
}
int main()
{
	LinkList L;
	Init(L);
	
	int n;
	cin >> n;
	
	Create(L, n);
	
	Del_Same(L);
	 
	Show(L);
	return 0;
}